<%-- 
    Document   : ads_insert
    Created on : Apr 20, 2012, 9:28:57 AM
    Author     : fikri
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>.: Pocket.my :.</title>   
        
        <script type="text/javascript">
            function doSubmit(e,f) {
                if (formValidation()) {
                   if (confirm('Are you sure?')){
                    f.action = f.action + '?' + e;
                    f.submit();
                 }
                }                
            }
        </script>
        
    </head>
    <body>
        <s:useActionBean beanclass="com.apps.epocket.stripes.util.ListUtil" var="list"/>
        <s:form beanclass="com.apps.epocket.stripes.action.AdsActionBean">
            <div id="center" class="column">	  	
                <div id="content">                         
                    
                    <div>                         
                        <ul>
                            <li style="color:#000000"> After you insert an ad, you will receive an email that requires you to confirm.
                        After approval, it will be published for a period of 60 days.</li>
                            <li style="color:#000000"> Duplicate ads will be refused.</li>
                            <li style="color:#000000"> One ad per item </li>
                            <li style="color:#000000"> Choose a title that is as descriptive as possible.</li>
                        </ul>                       
                    
                    </div>
                    
                    <br/>
                    
                    <p>
                        <label>&nbsp;</label>
                        <span><font style="color: red">*</font></span> are mandatory field.
                        
                    </p>
                    <p>
                        <label>Name <span><font style="color: red">*</font></span>:</label>
                        <s:text name="ads.namaPengiklan" size="35" class="required"/>                               
                    </p>
                    <p>
                        <label>Email <span><font style="color: red">*</font></span>:</label>
                                <s:text name="ads.emailPengiklan" style="text ui-widget-content ui-corner-all" class="required validate-email normal_text"/>
                    </p>
                    <p>
                        <label>IC Number <span><font style="color: red">*</font></span>:</label>
                        <s:text name="ads.noKp" class="required"/>
                    </p>
                    <p>
                        <label>Phone Number <span><font style="color: red">*</font></span>:</label>
                        <s:text name="ads.noTel" class="required validate-integer"/>
                    </p>
                    <p>
                        <label>Category <span><font style="color: red">*</font></span>:</label>
                        <s:select name="ads.kategoriProduk.idKategoriProduk" class="required">                            
                            <s:options-collection collection="${list.senaraiKategoriProduk}" label="kategoriKetergn" value="idKategoriProduk"/>
                        </s:select>
                    </p>
                    <p>
                        <label>Location <span><font style="color: red">*</font></span>:</label>
                        <s:select name="ads.negeriIklan.kodNegeri" class="required">                            
                            <s:options-collection collection="${list.senaraiKodNegeri}" label="ketrgnNegeri" value="kodNegeri"/>
                        </s:select>
                    </p>
                    <p>
                        <label>Heading <span><font style="color: red">*</font></span>:</label>
                        <s:text name="ads.namaIklan" size="35" class="required"/>
                    </p>
                    <p>
                        <label>Ad Text :</label>
                        <s:textarea name="ads.catatanIklan" cols="50" rows="10"/>
                    </p>
                    <p>
                        <label>Price :</label>
                        <s:text name="ads.hargaIklan" size="20" class="validate-float"/>
                    </p>
                    <p>
                        <label>Image[s] :</label>
                        <s:file name="senaraiDokumenIklan[0]" class="image"/>                        
                    </p>
                    <p>
                        <label>&nbsp;</label>
                        <s:file name="senaraiDokumenIklan[1]" class="image"/>                     
                    </p>
                    <p>
                        <label>&nbsp;</label>
                        <s:file name="senaraiDokumenIklan[2]" class="image"/>                    
                    </p>
                    <p>
                        <label>&nbsp;</label>
                        <s:file name="senaraiDokumenIklan[3]" class="image"/>                       
                    </p>
                    <p>
                        <label>&nbsp;</label>
                        <s:file name="senaraiDokumenIklan[4]" class="image"/>                     
                    </p>
                     <p>
                        <label>&nbsp;</label>
                        <s:button name="Step3" value="Confirm" onclick="doSubmit(this.name,this.form);"/>
                    </p>                    
                </div>

            </div>
        </s:form>
    </body>
</html>
